<?php
class Golden_Controller extends Template_Controller {
	
	public $mr;
	public $search;
	public $template = 'client/index';
	
    public function __construct()
    {
        parent::__construct();
        
		
    }
    
	public function __call($method, $arguments)
	{
		// Disable auto-rendering
		$this->auto_render = FALSE;
	}
	
    public function index()
    {
		$this->template->content = new View('golden/index');
		$this->show();
		$this->show_type();
    }
    public function show()
    {
		$language = $this->get_client_lang();
		if($language==1){
			$dir="vn/";
		}else{
			$dir="en/";
		}
		$model = new Goldens_Model();
		$mlist = $model->get_with_active($language);
		$this->template->content->mlist  = $mlist;
		$this->template->content->goldenDir  = $dir;
    } 
	 public function show_type()
    {
		$language = $this->get_client_lang();
		$model = new Goldens_type_Model();
		$mlist = $model->get_with_active($language);
		$this->template->content->mlistType  = $mlist;
    }  
}
?>